<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <title>Document</title>
    <script src="/lib/vue.js"></script>
    <style>
      .active {
        background-color: red;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <!-- template包装元素，不会真的创建在页面上 -->
      <template v-if="isCreated">
        <div>1</div>
        <div>2</div>
        <div>3</div>
      </template>
    </div>
    <script>
      var vm = new Vue({
        el: "#app",
        data() {
          return {
            isCreated: true,
          };
        },
      });
    </script>
  </body>
</html>
